package org.grayrabbit.cms.entity;

// Generated 2011-5-21 14:10:16 by Hibernate Tools 3.3.0.GA

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 * CmsRoleOperRela generated by hbm2java
 */
@Entity
@Table(name = "CMS_ROLE_OPER_RELA")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class RoleOperRela implements java.io.Serializable {

	private static final long serialVersionUID = 6467278361578580281L;
	private String roleOperRelaId;
	private Role role;
	private OperCode operCode;
	private String operTargetId;
	private String operTargetId2;
	private String operTargetId3;
	private String operTargetId4;
	private String operTargetId5;
	private String operTargetType;

	public RoleOperRela() {
	}


	@Id
	@Column(name = "ROLE_OPER_RELA_ID", unique = true, nullable = false, length = 32)
	@GeneratedValue(generator = "paymentableGenerator")       
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")  
	public String getRoleOperRelaId() {
		return this.roleOperRelaId;
	}

	public void setRoleOperRelaId(String roleOperRelaId) {
		this.roleOperRelaId = roleOperRelaId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ROLE_ID", nullable = false)
	public Role getRole() {
		return role;
	}


	public void setRole(Role role) {
		this.role = role;
	}

	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "OPER_ID", nullable = false)
	public OperCode getOperCode() {
		return operCode;
	}


	public void setOperCode(OperCode operCode) {
		this.operCode = operCode;
	}

	@Column(name = "OPER_TARGET_ID", length = 4000)
	public String getOperTargetId() {
		return this.operTargetId;
	}

	public void setOperTargetId(String operTargetId) {
		this.operTargetId = operTargetId;
	}

	@Column(name = "OPER_TARGET_TYPE", length = 32)
	public String getOperTargetType() {
		return this.operTargetType;
	}

	public void setOperTargetType(String operTargetType) {
		this.operTargetType = operTargetType;
	}

	@Column(name = "OPER_TARGET_ID2", length = 4000)
	public String getOperTargetId2() {
		return operTargetId2;
	}
	public void setOperTargetId2(String operTargetId2) {
		this.operTargetId2 = operTargetId2;
	}

	@Column(name = "OPER_TARGET_ID3", length = 4000)
	public String getOperTargetId3() {
		return operTargetId3;
	}
	public void setOperTargetId3(String operTargetId3) {
		this.operTargetId3 = operTargetId3;
	}

	@Column(name = "OPER_TARGET_ID4", length = 4000)
	public String getOperTargetId4() {
		return operTargetId4;
	}
	public void setOperTargetId4(String operTargetId4) {
		this.operTargetId4 = operTargetId4;
	}
	@Column(name = "OPER_TARGET_ID5", length = 4000)
	public String getOperTargetId5() {
		return operTargetId5;
	}
	public void setOperTargetId5(String operTargetId5) {
		this.operTargetId5 = operTargetId5;
	}
}
